package com.demo.work.util;

import java.util.Iterator;
import java.util.List;

/**
 * @author 19042980
 */
public class StringUtils {


    public static String join(List<String> list, String delimiter){
        StringBuilder sb = new StringBuilder();

        for(Iterator iterator = list.iterator(); iterator.hasNext(); sb.append(iterator.next())) {
            if (sb.length() != 0) {
                sb.append(delimiter);
            }
        }

        return sb.toString();
    }


}
